import {http} from '@/http';

/**
 * 获取用户余额
 * @returns 
 */
export function getUserRemainMoney() {
    return http.post('index.php/user/userCenter/getRemainMoney');
}

/**
 * 获取缔惠淘宝信息
 * @returns 
 */
export function getPlatformTaobao() {
    return http.post('index.php/User/OrderV3/Commodity');
}

/**
 * 获取平台收款二维码
 * @returns 
 */
export function getPlatformCollectionCode() {
    // return http.post('index.php/user/userCenter/linklink');
    return http.post('index.php/user/OrderV3/linklink');
}

/**
 * 获取人民币和台币汇率
 */
export function getRmbToTbExchange(data) {
	return http.post('index.php/user/OrderV3/exchange_list',data);
}

/**
 * 获取平台收款账户
 */
export function getPlatformCollectionAccount() {
	return http.post('index.php/user/OrderV3/Seachannelpay');
}

/**
 * 提交充值记录
 * @param {*} data 
 */
export function submitRecharge(data) {
	return http.post('index.php/user/User/withdrawals', data);
}

/**
 * 获取缔惠账户
 */
export function getDihuiAccount() {
	return http.post('index.php/user/OrderV3/accountReceive', {p: 1});
}

/**
 * 获取账单
 * @param {Object} data 
 */
export function getUserBill(data) {
	data.status = 1;
	return http.post('index.php/user/userCenter/getUserWallet', data);
}

/**
 * 获取凭证列表
 */
export function getVoucherList() {
	return http.post('index.php/user/UserCenter/voucherList');
}

/**
 * 获取凭证详情
 * @param {Number} id 
 */
export function getVoucherDetail(id) {
	return http.post('index.php/user/UserCenter/getVoucher', {id});
}

/**
 * 凭证新增
 * @param {Object} data 
 */
export function insertVoucher(data) {
	return http.post('index.php/user/userCenter/saveVoucher', data);
}